<?php
/**
 * Created by PhpStorm.

 * Date: 2017/8/24
 * Time: 15:31
 */
namespace app\admin\controller;
use think\Db;
/**
 * Created by PhpStorm.

 *
 */
class Transaction extends \think\Controller
{
    /**
     * @return mixed
     *@description 交易明细查询

     */
    public function index()
    {
//        $user_id = input('id');
        $details=Db::field('user.user_name,details.id,details.time,details.expense,details.expense_type')
            ->table('zx_user user,zx_details details')
            ->where("user.id=details.user_id")->paginate(1);
//        dump($details);exit;
        $page =$details->render();
        $this->assign('page', $page);
        $this->assign('details', $details);
//        $this->assign('pid', $pid);
        return $this->fetch('index');
    }

//    public function shoppingcar_del_a()
//    {
//        $shoppingcar_id = input('shoppingcar_id');
//        $rus=db('shoppingcar')->where('id',$shoppingcar_id)->delete();
//        if($rus){
//            $this->success('删除成功');
//        }else{
//            $this->error('删除失败');
//        }
//
//    }
}